NS4 = (document.layers) ? 1 : 0;
IE4 = (document.all) ? 1 : 0;
ver4 = (NS4 || IE4) ? 1 : 0;

function initIt(form,imagedirectory){
	with (form){
		if (!ver4) return;
		if (IE4){
			divColl = document.all.tags("DIV");
			for (i=0; i<divColl.length; i++) 
			{
				whichEl = divColl(i);
				if (whichEl.className.indexOf("child") != -1 ) 
				{
					whichEl.style.display = "none";				
				}
			}
		}
	}
}

function expandIt(form,el,imagedirectory) {
	with (form){
		whichEl = eval(el + "Child");
		imagesrc = eval(el + "wj");
		if (!ver4) return;
		if (IE4) {
			if (whichEl.style.display != "none") {
				whichEl.style.display = "none";
				imagesrc.src=imagedirectory + "TreeAdd.gif";
			}
			else {
				/*divColl = document.all.tags("DIV");
				for (i=0; i<divColl.length; i++) {
					whichEl1 = divColl(i);
					if ((whichEl1.id.substr(0,el.length-2) == el.substr(0,el.length-2)) && (whichEl1.className.length == whichEl.className.length )) {
						whichEl1.style.display = "none";
					}
				}
				for (j=0;j<document.images.length;j++){
					if (document.images[j].name.length == el.length + 2){
						document.images[j].src= imagedirectory + "TreeAdd.gif"
					}
				}*/
				whichEl.style.display = "block";
				imagesrc.src= imagedirectory + "TreeSub.gif"
			}
		}
	}
}
//onload = initIt();
/*
function Images()
	{
	document.image1.src="image/TreeSub.gif"
	}
*/
